/*1 import  Excel导入
2 pro_devel  打版过程中的文件
3 product 新品文件
4 user 用户头像
5 product/image 新品图片*/

import { getUrlParam } from '@/utils';

const file_import = 1;
const file_pro_devel = 2;
const file_product = 3;
const file_user = 4;
const file_product_image = 5;
const file_material = 6;
//采购附件
const file_purchase = 7;
//采购支付凭据
const file_purchase_paylog = 8;
//红人文件
const file_cyberstar_sign = 9;
const file_cyberstar = 9;
//大货生产附件
const file_make_process = 10;
//售后附件
const after_sale = 13;
const supplier = 11;
const foodOrderService = 14;


const uploadType = {
  file_purchase,
  file_purchase_paylog,
  file_import,
  file_pro_devel,
  file_product,
  file_user,
  file_product_image,
  file_material,
  file_cyberstar_sign,
  file_make_process,
  file_cyberstar,
  after_sale,
  supplier,
  foodOrderService,

};

export const ossType = {
  'aliyun': 'https://szqerp.oss-cn-guangzhou.aliyuncs.com',
  'szqerp-prod': 'http://api.szqerp.com/erp/static',
  'szqerp-dev': 'http://apidev.szqerp.com/erp/static',
};

export function getQueryParams(url, key = 'osstype') {
  if (!url) return '';
  return getUrlParam(key, url);

}

export default uploadType;
